from _01_data_model.frenchdeck import FrenchDeck, Card

suit_values = dict(spades=3, hearts=2, diamonds=1, clubs=0)


def spades_high(card):
    rank_value = FrenchDeck.ranks.index(card.rank)
    return rank_value * len(suit_values) + suit_values[card.suit]


if __name__ == '__main__':
    # num = spades_high(Card('2', 'clubs'))
    num = spades_high(Card('A', 'spades'))
    print(num)
